/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
/*-------------------------------------------------------------------------
 *
 * skylon_vlabel.h
 *    record sql execution information
 *
 *-------------------------------------------------------------------------
 */

#ifndef SRC_INCLUDE_CATALOG_SKYLON_VLABEL_H_
#define SRC_INCLUDE_CATALOG_SKYLON_VLABEL_H_

#include "catalog/genbki.h"

/* TIDYCAT_BEGINDEF

   CREATE TABLE skylon_vlabel
   with (camelcase=Vlabel, shared=true, oid=false, relid=4850, reltype_oid=4870, content=MASTER_ONLY)
   (
   vlabelName                name,
   schemaName              name
   );

   TIDYCAT_ENDDEF
*/

/* TIDYCAT_BEGIN_CODEGEN

   WARNING: DO NOT MODIFY THE FOLLOWING SECTION:
   Generated by tidycat.pl version 34
   on Fri Feb 26 10:43:15 2016
*/


/*
 TidyCat Comments for gp_configuration_history:
  Table is shared, so catalog.c:IsSharedRelation is updated.
  Table does not have an Oid column.
  Table has static type (see pg_types.h).
  Table has TOASTable columns, but NO TOAST table.
  Table contents are only maintained on MASTER.
  Table has weird hack for timestamp column.

*/

/*
 * The CATALOG definition has to refer to the type of "time" as
 * "timestamptz" (lower case) so that bootstrap mode recognizes it.  But
 * the C header files define this type as TimestampTz.  Since the field is
 * potentially-null and therefore cannot be accessed directly from C code,
 * there is no particular need for the C struct definition to show the
 * field type as TimestampTz --- instead we just make it Datum.
 */


/* ----------------
 *    skylon_vlabel definition.  cpp turns this into
 *    typedef struct FormData_skylon_vlabel
 * ----------------
 */

#define VlabelRelationId 4850

CATALOG(skylon_vlabel,4850) BKI_WITHOUT_OIDS
{
  NameData vlabelname;
  NameData schemaname;
} FormData_skylon_vlabel;


/* ----------------
 *    Form_skylon_vlabel corresponds to a pointer to a tuple with
 *    the format of skylon_vlabel relation.
 * ----------------
 */

typedef FormData_skylon_vlabel *Form_skylon_vlabel;

/* ----------------
 *    compiler constants for pg_database
 * ----------------
 */
#define Natts_skylon_vlabel 2
#define Anum_skylon_vlabel_vlabelname 1
#define Anum_skylon_vlabel_schemaname 2
/* TIDYCAT_END_CODEGEN */

extern void InsertVlabelEntry(const char* vlabelname, const char* schemaname);
#endif /* SRC_INCLUDE_CATALOG_SKYLON_VLABEL_H_ */
